<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Project - Subscription</title>
</head>
<body>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt" %>

<p>
	Subscribe to course <b><c:out value="${requestScope.session.course.code} - ${requestScope.session.course.title}" /></b>
	<br /><br />
	Session:<br />
	- Start date: <fmt-rt:formatDate value="${requestScope.session.start}" pattern="dd/MM/yyyy"/><br />
	- End date: <fmt-rt:formatDate value="${requestScope.session.end}" pattern="dd/MM/yyyy"/><br />
	- Location: <c:out value="${requestScope.session.location.city}" /><br />
</p>
<p style="font-style:italic;font-size:10pt;">Fields with a * are mandatory.</p>
<c:if test="${requestScope.areEmpty}">
	<span style="color:red;">You must fill in all the mandatory fields.</span>
</c:if>
<form method="POST" action="addclient">
	<input type="hidden" value="${requestScope.session.id}" name="sessionId" />
	<table>
		<tr>
			<td>Last name *:</td>
			<td><input type="text" name="lastname" /></td>
		</tr>
		<tr>
			<td>First name *:</td>
			<td><input type="text" name="firstname" /></td>
		</tr>
		<tr>
			<td>Address *:</td>
			<td><input type="text" name="address" /></td>
		</tr>
		<tr>
			<td>Phone *:</td>
			<td><input type="text" name="phone" /></td>
		</tr>
		<tr>
			<td>Email:</td>
			<td><input type="text" name="email" /></td>
		</tr>
		<tr>
			<td></td>
			<td><input type="submit" value="Validate" /></td>
		</tr>
	</table>
</form>

</body>
</html>